﻿@model LoginViewModel 

    <h1>Sign In With</h1>
    <form asp-controller="Auth" asp-action="ExternalLogin" 
          asp-route-returnUrl="@Model.ReturnUrl" method="post">
        @foreach (var provider in Model.ExternalProviders)
        {
            <button name="provider"
                    type="submit"
                    value="@provider.Name">
                @provider.Name
            </button>
        }
    </form>

    <form asp-controller="Auth" asp-action="Login" method="post">
        <input type="hidden" asp-for="ReturnUrl" />
        <div>
            <label>Username</label>
            <input asp-for="Username" />
        </div>
        <div>
            <label>Password</label>
            <input asp-for="Password" />
        </div>
        <div>
            <button type="submit">Sign In</button>
        </div>
    </form> 
    <div>
        <a asp-controller="Auth" asp-action="Register" 
           asp-route-returnUrl="@Model.ReturnUrl">Register</a>
    </div>